﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL
{
   public class UIChangePwd
    {
        public string username { get; set; }
        [Required(ErrorMessage = "密码不可以为空")]
        public string oldpass { get; set; }
        [Required(ErrorMessage = "密码不可以为空")]
        [StringLength(16, ErrorMessage = "密码长度为6到16个字符", MinimumLength = 6)]
        [RegularExpression(@"^\w+\d+$", ErrorMessage = "密码必须包含字母和数字")]
        public string newpass { get; set; }
        [Compare("newpass", ErrorMessage = "确认密码和新密码必须一致")]
        public string repass { get; set; }
    }
}
